home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / snip9707.zip / VT100.TXT < prev    next >
Text File  |  1997-07-05  |  10KB  |  202 lines

  1. +++Date last modified: 05-Jul-1997
  2.  
  3. #
  4. #                        VT100 Escape Codes
  5. #        symbology:
  6. #        ^[       = escape character (ascii 27 decimal)
  7. #        <v>         = single or double digit number.  Vertical coordinate
  8. #        <h>         = single or double digit number.  Horizontal coordinate
  9. #        <n>         = single or double digit number.  Number of chars/lines
  10. #        others   = single characters just as they appear.
  11. #
  12. # NOTE: Many sequences have "^[[" which is two chars: "escape" and "[".
  13. #
  14.  
  15. Name                  Description                            Esc Code
  16. --------------------  -------------------------------------  -----------
  17. setnl LMN             Set new line mode                      ^[[20h
  18. setappl DECCKM        Set cursor key to application          ^[[?1h
  19. setansi DECANM        Set ANSI (versus VT52)                 none
  20. setcol DECCOLM        Set number of columns to 132           ^[[?3h
  21. setsmooth DECSCLM     Set smooth scrolling                   ^[[?4h
  22. setrevscrn DECSCNM    Set reverse video on screen            ^[[?5h
  23. setorgrel DECOM       Set origin to relative                 ^[[?6h
  24. setwrap DECAWM        Set auto-wrap mode                     ^[[?7h
  25. setrep DECARM         Set auto-repeat mode                   ^[[?8h
  26. setinter DECINLM      Set interlacing mode                   ^[[?9h
  27.  
  28. setlf LMN             Set line feed mode                     ^[[20l
  29. setcursor DECCKM      Set cursor key to cursor               ^[[?1l
  30. setvt52 DECANM        Set VT52 (versus ANSI)                 ^[[?2l
  31. resetcol DECCOLM      Set number of columns to 80            ^[[?3l
  32. setjump DECSCLM       Set jump scrolling                     ^[[?4l
  33. setnormscrn DECSCNM   Set normal video on screen             ^[[?5l
  34. setorgabs DECOM       Set origin to absolute                 ^[[?6l
  35. resetwrap DECAWM      Reset auto-wrap mode                   ^[[?7l
  36. resetrep DECARM       Reset auto-repeat mode                 ^[[?8l
  37. resetinter DECINLM    Reset interlacing mode                 ^[[?9l
  38.  
  39. altkeypad DECKPAM     Set alternate keypad mode              ^[=
  40. numkeypad DECKPNM     Set numeric keypad mode                ^[>
  41.  
  42. setukg0               Set United Kingdom G0 character set    ^[(A
  43. setukg1               Set United Kingdom G1 character set    ^[)A
  44. setusg0               Set United States G0 character set     ^[(B
  45. setusg1               Set United States G1 character set     ^[)B
  46. setspecg0             Set G0 special chars. & line set       ^[(0
  47. setspecg1             Set G1 special chars. & line set       ^[)0
  48. setaltg0              Set G0 alternate character ROM         ^[(1
  49. setaltg1              Set G1 alternate character ROM         ^[)1
  50. setaltspecg0          Set G0 alt char ROM and spec. graphics ^[(2
  51. setaltspecg1          Set G1 alt char ROM and spec. graphics ^[)2
  52.  
  53. setss2 SS2            Set single shift 2                     ^[N
  54. setss3 SS3            Set single shift 3                     ^[O
  55.  
  56. modesoff SGR0         Turn off character attributes          ^[[m
  57. modesoff SGR0         Turn off character attributes          ^[[0m
  58. bold SGR1             Turn bold mode on                      ^[[1m
  59. lowint SGR2           Turn low intensity mode on             ^[[2m
  60. underline SGR4        Turn underline mode on                 ^[[4m
  61. blink SGR5            Turn blinking mode on                  ^[[5m
  62. reverse SGR7          Turn reverse video on                  ^[[7m
  63. invisible SGR8        Turn invisible text mode on            ^[[8m
  64.  
  65. setwin DECSTBM        Set top and bottom line#s of a window  ^[[<v>;<v>r
  66.  
  67. cursorup(n) CUU       Move cursor up n lines                 ^[[<n>A
  68. cursordn(n) CUD       Move cursor down n lines               ^[[<n>B
  69. cursorrt(n) CUF       Move cursor right n lines              ^[[<n>C
  70. cursorlf(n) CUB       Move cursor left n lines               ^[[<n>D
  71. cursorhome            Move cursor to upper left corner       ^[[H
  72. cursorhome            Move cursor to upper left corner       ^[[;H
  73. cursorpos(v,h) CUP    Move cursor to screen location v,h     ^[[<v>;<h>H
  74. hvhome                Move cursor to upper left corner       ^[[f
  75. hvhome                Move cursor to upper left corner       ^[[;f
  76. hvpos(v,h) CUP        Move cursor to screen location v,h     ^[[<v>;<h>f
  77. index IND             Move/scroll window up one line         ^[D
  78. revindex RI           Move/scroll window down one line       ^[M
  79. nextline NEL          Move to next line                      ^[E
  80. savecursor DECSC      Save cursor position and attributes    ^[7
  81. restorecursor DECSC   Restore cursor position and attributes ^[8
  82.  
  83. tabset HTS            Set a tab at the current column        ^[H
  84. tabclr TBC            Clear a tab at the current column      ^[[g
  85. tabclr TBC            Clear a tab at the current column      ^[[0g
  86. tabclrall TBC         Clear all tabs                         ^[[3g
  87.  
  88. dhtop DECDHL          Double-height letters, top half        ^[#3
  89. dhbot DECDHL          Double-height letters, bottom half     ^[#4
  90. swsh DECSWL           Single width, single height letters    ^[#5
  91. dwsh DECDWL           Double width, single height letters    ^[#6
  92.  
  93. cleareol EL0          Clear line from cursor right           ^[[K
  94. cleareol EL0          Clear line from cursor right           ^[[0K
  95. clearbol EL1          Clear line from cursor left            ^[[1K
  96. clearline EL2         Clear entire line                      ^[[2K
  97.  
  98. cleareos ED0          Clear screen from cursor down          ^[[J
  99. cleareos ED0          Clear screen from cursor down          ^[[0J
  100. clearbos ED1          Clear screen from cursor up            ^[[1J
  101. clearscreen ED2       Clear entire screen                    ^[[2J
  102.  
  103. devstat DSR           Device status report                   ^[5n
  104. termok DSR               Response: terminal is OK            ^[0n
  105. termnok DSR              Response: terminal is not OK        ^[3n
  106.  
  107. getcursor DSR         Get cursor position                    ^[6n
  108. cursorpos CPR            Response: cursor is at v,h          ^[<v>;<h>R
  109.  
  110. ident DA              Identify what terminal type            ^[[c
  111. ident DA              Identify what terminal type (another)  ^[[0c
  112. gettype DA               Response: terminal type code n      ^[[?1;<n>0c
  113.  
  114. reset RIS             Reset terminal to initial state        ^[c
  115.  
  116. align DECALN          Screen alignment display               ^[#8
  117. testpu DECTST         Confidence power up test               ^[[2;1y
  118. testlb DECTST         Confidence loopback test               ^[[2;2y
  119. testpurep DECTST      Repeat power up test                   ^[[2;9y
  120. testlbrep DECTST      Repeat loopback test                   ^[[2;10y
  121.  
  122. ledsoff DECLL0        Turn off all four leds                 ^[[0q
  123. led1 DECLL1           Turn on LED #1                         ^[[1q
  124. led2 DECLL2           Turn on LED #2                         ^[[2q
  125. led3 DECLL3           Turn on LED #3                         ^[[3q
  126. led4 DECLL4           Turn on LED #4                         ^[[4q
  127.  
  128. #
  129. #  All codes below are for use in VT52 compatibility mode.
  130. #
  131.  
  132. setansi               Enter/exit ANSI mode (VT52)            ^[<
  133.  
  134. altkeypad             Enter alternate keypad mode            ^[=
  135. numkeypad             Exit alternate keypad mode             ^[>
  136.  
  137. setgr                 Use special graphics character set     ^[F
  138. resetgr               Use normal US/UK character set         ^[G
  139.  
  140. cursorup              Move cursor up one line                ^[A
  141. cursordn              Move cursor down one line              ^[B
  142. cursorrt              Move cursor right one char             ^[C
  143. cursorlf              Move cursor left one char              ^[D
  144. cursorhome            Move cursor to upper left corner       ^[H
  145. cursorpos(v,h)        Move cursor to v,h location            ^[<v><h>
  146. revindex              Generate a reverse line-feed           ^[I
  147.  
  148. cleareol              Erase to end of current line           ^[K
  149. cleareos              Erase to end of screen                 ^[J
  150.  
  151. ident                 Identify what the terminal is          ^[Z
  152. identresp             Correct response to ident              ^[/Z
  153.  
  154. #=======================================================================
  155.  
  156. #
  157. # VT100 Special Key Codes
  158. #
  159. # These are sent from the terminal back to the computer when the
  160. # particular key is pressed.  Note that the numeric keypad keys
  161. # send different codes in numeric mode than in alternate mode.
  162. # See escape codes above to change keypad mode.
  163. #
  164.  
  165. # Function Keys:
  166.  
  167. PF1                ^[OP
  168. PF2                ^[OQ
  169. PF3                ^[OR
  170. PF4                ^[OS
  171.  
  172.  
  173. # Arrow Keys:
  174.                 Reset         Set
  175.                 -----         ---
  176. up               ^[A         ^[OA
  177. down             ^[B         ^[OB
  178. right            ^[C         ^[OC
  179. left             ^[D         ^[OD
  180.  
  181.  
  182. # Numeric Keypad Keys:
  183.  
  184.                 Keypad Mode
  185.                 -----------------
  186. Keypad Key        Numeric        Alternate
  187. ----------        -------        ---------
  188. 0                0        ^[Op
  189. 1                1        ^[Oq
  190. 2                2        ^[Or
  191. 3                3        ^[Os
  192. 4                4        ^[Ot
  193. 5                5        ^[Ou
  194. 6                6        ^[Ov
  195. 7                7        ^[Ow
  196. 8                8        ^[Ox
  197. 9                9        ^[Oy
  198. - (minus)        -        ^[Om
  199. , (comma)        ,        ^[Ol
  200. . (period)       .        ^[On
  201. ENTER           ^M        ^[OM
  202.